A crankshaft position detector operates based on protocol pulse detection and counting. The protocol pulses are transmitted to an Electronic Control Unit (ECU) to control, for example, ignition timing and fuel injection timing of a vehicle.
The detector may include a toothed disc mounted on a shaft, stationary sensors and circuitry. The disc has teeth distributed evenly around the circumference. When the shaft rotates, the teeth pass by magnetic sensors providing speed and direction information. The speed is represented by a sine wave, and the direction is represented by a cosine wave. If there is a zero-crossing of the sine wave (speed signal), the cosine wave (direction signal) is sampled to determine the object's direction. A zero-crossing is a point when a sign of the wave changes, e.g., from positive to negative, represented by a crossing of the axis in the graph of the wave.
In crankshaft applications, a forward protocol pulse is triggered on the falling edge of the speed signal, and a backward protocol pulse is triggered on the rising edge of the speed signal. The direction information of the crankshaft should therefore be known prior to the protocol pulse being triggered.